package cn.itsource.wechat.mapper;

import cn.itsource.wechat.domain.WxUser;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

public interface WxUserMapper extends Mapper<WxUser> {
    default WxUser selectOneByOpenId(String code) {
        Example example = new Example(WxUser.class);
        example.and().andEqualTo("openid", code);
        return this.selectOneByExample(example);
    }
}
